package sample_client;

import java.io.IOException;
import java.net.Socket;
import java.net.UnknownHostException;
import java.util.Random;

public class sample_client {
	public static void main(String[] args) throws Exception {
		for (int i = 1; i<= 1000; i++) {
			new Thread() {
				public void run() {
					try {
						Socket client = new Socket("localhost", 4444);
						
						Client c = new Client();
						c.setClient(client);
						c.setFirstName(currentThread().getName());
						c.setLastName(currentThread().getName());
						c.setGender(new Random().nextInt(1));
						
						try {
							c.sendEmployee();
						} catch (Exception e) {
							// TODO Auto-generated catch block
							e.printStackTrace();
						}
						
					} catch (UnknownHostException e) {
						// TODO Auto-generated catch block
						e.printStackTrace();
					} catch (IOException e) {
						// TODO Auto-generated catch block
						e.printStackTrace();
					}
				}
			}.start();
		}
		
		
		
       
	}
	
	
}
